#ifndef TABSYM_H
#define TABSYM_H

#include "tablesymb.h"
#include "ll.h"
#include "ht.h"
#include "debug.h"

typedef ll_list tabsym;

typedef enum {
    sclvl_loc,
    sclvl_fun,
    sclvl_inst,
    sclvl_glob
} Scope_level;

typedef struct {
	Type type;
	bool constant;
    char *reg;
} Symbol;

// Creation / deletion
tabsym* ts_create();
tabsym* ts_delete();

// Looking up stuff
Symbol* ts_lookup_top(tabsym* ts, char const* nom);
Symbol* ts_lookup(tabsym* ts, char const* nom);

// Handling scopes

void ts_pushs(tabsym* ts, Scope_level);
void ts_pops(tabsym* ts);

// Adding stuff
Symbol* ts_add(tabsym* ts, char const* nom, Type t);

// Pretty printing
char const* pp_scope_level(Scope_level);

#endif
